using System;

namespace CL
{
	public interface ICLLateUpdate
    {
	}

	public interface ICLLateUpdateSystem : ICLSystemType
	{
		void Run(CLEntity o);
	}

    public abstract class CLLateUpdateSystem<T> : CLSystemObject, ICLLateUpdateSystem where T : CLEntity, ICLLateUpdate
    {
        public int GetInstanceQueueIndex()
        {
            return CLInstanceQueueIndex.LateUpdate;
        }

        public void Run(CLEntity o)
        {
            this.LateUpdate((T)o);
        }

        public Type SystemType()
        {
            return typeof(ICLLateUpdateSystem);
        }

        public Type Type()
        {
            return typeof(T);
        }
        protected abstract void LateUpdate(T self);
    }
}
